package com.wxf.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MyListener {

    @RabbitListener(queues = "springboot_fanout_queue_01")
    public void myListener1(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }

    @RabbitListener(queues = "springboot_fanout_queue_02")
    public void myListener2(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }

    @RabbitListener(queues = "springboot_direct_queue_insert")
    public void myListener3(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }

    @RabbitListener(queues = "springboot_direct_queue_update")
    public void myListener4(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }

    @RabbitListener(queues = "springboot_topic_queue_insert")
    public void myListener5(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }

    @RabbitListener(queues = "springboot_topic_queue_all")
    public void myListener6(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }

}
